package com.hxk;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 消息接送者
 * @author Cactus
 */
@Component
public class Receiver {

	/**
	 * 接收消息，采用消息队列监听机制
	 * @param msg
	 */
	@RabbitListener(queues="myMQ")
	public void receive(String msg) {
		System.out.println("消息："+msg);
	}
}
